#!/usr/bin/env bash

set -e -u -x
source ./tasks/helpers.sh

task_working_dir

# Install into the task's special _persist directory so the large node_modules
# directory isn't cleaned between runs for development purposes.
mkdir -p _persist
cd _persist

# Copy the npm/pnpm config files into the working directory and perform the
# installation here (so we're not creating/modifying files in the source
# directory).
cp "$SOURCE_DIR/src/api-umbrella/example-website/package.json" ./
cp "$SOURCE_DIR/src/api-umbrella/example-website/pnpm-lock.yaml" ./
PATH="$DEV_PATH" pnpm install --frozen-lockfile

stamp
